package com.caiyigo.baihua.Const;

import java.io.File;

/**
 * Global constants definition
 */
public interface Const {

	String JFINAL_VERSION = "1.8";

	String DEFAULT_ENCODING = "utf-8";

	String DEFAULT_URL_PARA_SEPARATOR = "-";

	String DEFAULT_FILE_CONTENT_TYPE = "application/octet-stream";

	String DEFAULT_JSP_EXTENSION = ".jsp";

	String DEFAULT_FREE_MARKER_EXTENSION = ".html"; // The original is ".ftl",
													// Recommend ".html"

	String DEFAULT_VELOCITY_EXTENSION = ".vm";

	// "WEB-INF/download" + File.separator maybe better otherwise it can be
	// downloaded by browser directly
	String DEFAULT_FILE_RENDER_BASE_PATH = File.separator + "download"
			+ File.separator;

	int DEFAULT_MAX_POST_SIZE = 1024 * 1024 * 10; // Default max post size of
													// multipart request: 10 Meg

	String I18N_LOCALE = "__I18N_LOCALE__"; // The i18n name of cookie

	int DEFAULT_I18N_MAX_AGE_OF_COOKIE = 999999999;

	int DEFAULT_FREEMARKER_TEMPLATE_UPDATE_DELAY = 3600; // For not devMode only

	String DEFAULT_TOKEN_NAME = "jfinal_token";

	int DEFAULT_SECONDS_OF_TOKEN_TIME_OUT = 900; // 900 seconds ---> 15 minutes

	int MIN_SECONDS_OF_TOKEN_TIME_OUT = 300; // 300 seconds ---> 5 minutes
	public static final String SESSION_USER = "user";

	/***
	 * 分布式session开关 请在redis.properties 配置ip和端口
	 */
	public static boolean OPEN_REDIS = true;

	public static class Jobs {
		// 数据库备份的任务调度
		public final static String com_caiyigo_job_DbBackupJob = "com.caiyigo.job.DbBackupJob";

	}

	public static class ErrorTips {
		// 数据库备份的任务调度
		public final static String ErrorTips_500 = "系统无法处理你的请求，请稍后再次或者联系技术支持人员";

	}
}
